package com.ruoyi.tongban.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tongban.mapper.SysAgreementMapper;
import com.ruoyi.tongban.domain.SysAgreement;
import com.ruoyi.tongban.service.ISysAgreementService;

/**
 * 协议内容Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-05-27
 */
@Service
public class SysAgreementServiceImpl implements ISysAgreementService 
{
    @Autowired
    private SysAgreementMapper sysAgreementMapper;

    /**
     * 查询协议内容
     * 
     * @param agreementId 协议内容ID
     * @return 协议内容
     */
    @Override
    public SysAgreement selectSysAgreementById(Long agreementId)
    {
        return sysAgreementMapper.selectSysAgreementById(agreementId);
    }

    /**
     * 查询协议内容列表
     * 
     * @param sysAgreement 协议内容
     * @return 协议内容
     */
    @Override
    public List<SysAgreement> selectSysAgreementList(SysAgreement sysAgreement)
    {
        return sysAgreementMapper.selectSysAgreementList(sysAgreement);
    }

    /**
     * 新增协议内容
     * 
     * @param sysAgreement 协议内容
     * @return 结果
     */
    @Override
    public int insertSysAgreement(SysAgreement sysAgreement)
    {
        return sysAgreementMapper.insertSysAgreement(sysAgreement);
    }

    /**
     * 修改协议内容
     * 
     * @param sysAgreement 协议内容
     * @return 结果
     */
    @Override
    public int updateSysAgreement(SysAgreement sysAgreement)
    {
        return sysAgreementMapper.updateSysAgreement(sysAgreement);
    }

    /**
     * 批量删除协议内容
     * 
     * @param agreementIds 需要删除的协议内容ID
     * @return 结果
     */
    @Override
    public int deleteSysAgreementByIds(Long[] agreementIds)
    {
        return sysAgreementMapper.deleteSysAgreementByIds(agreementIds);
    }

    /**
     * 删除协议内容信息
     * 
     * @param agreementId 协议内容ID
     * @return 结果
     */
    @Override
    public int deleteSysAgreementById(Long agreementId)
    {
        return sysAgreementMapper.deleteSysAgreementById(agreementId);
    }
}
